3.149 \(\int \frac {\tan ^2(a+i \log (x))}{x^3} \, dx\)

Optimal. Leaf size=55 \[ -\frac {2 e^{-2 i a}}{1+\frac {e^{2 i a}}{x^2}}-2 e^{-2 i a} \log \left (1+\frac {e^{2 i a}}{x^2}\right )+\frac {1}{2 x^2} \]

[Out]

-2/exp(2*I*a)/(1+exp(2*I*a)/x^2)+1/2/x^2-2*ln(1+exp(2*I*a)/x^2)/exp(2*I*a)

________________________________________________________________________________________

Rubi [F]  time = 0.05, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \[ \int \frac {\tan ^2(a+i \log (x))}{x^3} \, dx \]

Verification is Not applicable to the result.

[In]

Int[Tan[a + I*Log[x]]^2/x^3,x]

[Out]

Defer[Int][Tan[a + I*Log[x]]^2/x^3, x]

Rubi steps

\begin {align*} \int \frac {\tan ^2(a+i \log (x))}{x^3} \, dx &=\int \frac {\tan ^2(a+i \log (x))}{x^3} \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.19, size = 150, normalized size = 2.73 \[ \frac {2 \cos (a)-2 i \sin (a)}{\left (x^2+1\right ) \cos (a)-i \left (x^2-1\right ) \sin (a)}-2 i \cos (2 a) \tan ^{-1}\left (\frac {\left (x^2+1\right ) \cot (a)}{x^2-1}\right )-2 \sin (2 a) \tan ^{-1}\left (\frac {\left (x^2+1\right ) \cot (a)}{x^2-1}\right )-\cos (2 a) \log \left (2 x^2 \cos (2 a)+x^4+1\right )+i \sin (2 a) \log \left (2 x^2 \cos (2 a)+x^4+1\right )-4 i \sin (2 a) \log (x)+4 \cos (2 a) \log (x)+\frac {1}{2 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[a + I*Log[x]]^2/x^3,x]

[Out]

1/(2*x^2) - (2*I)*ArcTan[((1 + x^2)*Cot[a])/(-1 + x^2)]*Cos[2*a] + 4*Cos[2*a]*Log[x] - Cos[2*a]*Log[1 + x^4 +
2*x^2*Cos[2*a]] + (2*Cos[a] - (2*I)*Sin[a])/((1 + x^2)*Cos[a] - I*(-1 + x^2)*Sin[a]) - 2*ArcTan[((1 + x^2)*Cot
[a])/(-1 + x^2)]*Sin[2*a] - (4*I)*Log[x]*Sin[2*a] + I*Log[1 + x^4 + 2*x^2*Cos[2*a]]*Sin[2*a]

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 74, normalized size = 1.35 \[ \frac {5 \, x^{2} e^{\left (2 i \, a\right )} - 4 \, {\left (x^{4} + x^{2} e^{\left (2 i \, a\right )}\right )} \log \left (x^{2} + e^{\left (2 i \, a\right )}\right ) + 8 \, {\left (x^{4} + x^{2} e^{\left (2 i \, a\right )}\right )} \log \relax (x) + e^{\left (4 i \, a\right )}}{2 \, {\left (x^{4} e^{\left (2 i \, a\right )} + x^{2} e^{\left (4 i \, a\right )}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(a+I*log(x))^2/x^3,x, algorithm="fricas")

[Out]

1/2*(5*x^2*e^(2*I*a) - 4*(x^4 + x^2*e^(2*I*a))*log(x^2 + e^(2*I*a)) + 8*(x^4 + x^2*e^(2*I*a))*log(x) + e^(4*I*
a))/(x^4*e^(2*I*a) + x^2*e^(4*I*a))

________________________________________________________________________________________

giac [B]  time = 0.77, size = 178, normalized size = 3.24 \[ -\frac {2 \, \log \left (-x^{2} - e^{\left (2 i \, a\right )}\right )}{\frac {e^{\left (4 i \, a\right )}}{x^{2}} + e^{\left (2 i \, a\right )}} + \frac {4 \, \log \relax (x)}{\frac {e^{\left (4 i \, a\right )}}{x^{2}} + e^{\left (2 i \, a\right )}} - \frac {2}{\frac {e^{\left (4 i \, a\right )}}{x^{2}} + e^{\left (2 i \, a\right )}} - \frac {2 \, e^{\left (2 i \, a\right )} \log \left (-x^{2} - e^{\left (2 i \, a\right )}\right )}{x^{2} {\left (\frac {e^{\left (4 i \, a\right )}}{x^{2}} + e^{\left (2 i \, a\right )}\right )}} + \frac {4 \, e^{\left (2 i \, a\right )} \log \relax (x)}{x^{2} {\left (\frac {e^{\left (4 i \, a\right )}}{x^{2}} + e^{\left (2 i \, a\right )}\right )}} + \frac {e^{\left (2 i \, a\right )}}{2 \, x^{2} {\left (\frac {e^{\left (4 i \, a\right )}}{x^{2}} + e^{\left (2 i \, a\right )}\right )}} + \frac {e^{\left (4 i \, a\right )}}{2 \, x^{4} {\left (\frac {e^{\left (4 i \, a\right )}}{x^{2}} + e^{\left (2 i \, a\right )}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(a+I*log(x))^2/x^3,x, algorithm="giac")

[Out]

-2*log(-x^2 - e^(2*I*a))/(e^(4*I*a)/x^2 + e^(2*I*a)) + 4*log(x)/(e^(4*I*a)/x^2 + e^(2*I*a)) - 2/(e^(4*I*a)/x^2
 + e^(2*I*a)) - 2*e^(2*I*a)*log(-x^2 - e^(2*I*a))/(x^2*(e^(4*I*a)/x^2 + e^(2*I*a))) + 4*e^(2*I*a)*log(x)/(x^2*
(e^(4*I*a)/x^2 + e^(2*I*a))) + 1/2*e^(2*I*a)/(x^2*(e^(4*I*a)/x^2 + e^(2*I*a))) + 1/2*e^(4*I*a)/(x^4*(e^(4*I*a)
/x^2 + e^(2*I*a)))

________________________________________________________________________________________

maple [A]  time = 0.06, size = 51, normalized size = 0.93 \[ \frac {1}{2 x^{2}}+\frac {2}{x^{2} \left (1+\frac {{\mathrm e}^{2 i a}}{x^{2}}\right )}+4 \,{\mathrm e}^{-2 i a} \ln \relax (x )-2 \,{\mathrm e}^{-2 i a} \ln \left ({\mathrm e}^{2 i a}+x^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(a+I*ln(x))^2/x^3,x)

[Out]

1/2/x^2+2/x^2/(1+exp(2*I*a)/x^2)+4*exp(-2*I*a)*ln(x)-2*exp(-2*I*a)*ln(exp(2*I*a)+x^2)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(a+I*log(x))^2/x^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

________________________________________________________________________________________

mupad [B]  time = 2.21, size = 56, normalized size = 1.02 \[ -2\,{\mathrm {e}}^{-a\,2{}\mathrm {i}}\,\ln \left (x^2+{\mathrm {e}}^{a\,2{}\mathrm {i}}\right )+4\,{\mathrm {e}}^{-a\,2{}\mathrm {i}}\,\ln \relax (x)+\frac {\frac {5\,x^2}{2}+\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}}}{2}}{x^4+{\mathrm {e}}^{a\,2{}\mathrm {i}}\,x^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(a + log(x)*1i)^2/x^3,x)

[Out]

4*exp(-a*2i)*log(x) - 2*exp(-a*2i)*log(exp(a*2i) + x^2) + (exp(a*2i)/2 + (5*x^2)/2)/(x^2*exp(a*2i) + x^4)

________________________________________________________________________________________

sympy [A]  time = 0.49, size = 61, normalized size = 1.11 \[ - \frac {- 5 x^{2} - e^{2 i a}}{2 x^{4} + 2 x^{2} e^{2 i a}} + 4 e^{- 2 i a} \log {\relax (x )} - 2 e^{- 2 i a} \log {\left (x^{2} + e^{2 i a} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(a+I*ln(x))**2/x**3,x)

[Out]

-(-5*x**2 - exp(2*I*a))/(2*x**4 + 2*x**2*exp(2*I*a)) + 4*exp(-2*I*a)*log(x) - 2*exp(-2*I*a)*log(x**2 + exp(2*I
*a))

________________________________________________________________________________________